<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link type="text/css" rel="stylesheet" href="/stylesheets/bootstrap.min.css" />
  <title>角色列表</title>

  <!--引入jq插件-->
  <script type="text/javascript" src="/javascripts/jquery-1.8.3.min.js"></script>

  <!--引入base.js用于删除提醒-->
  <script type="text/javascript" src="/javascripts/base.js"></script>
</head>

<body>

<div class="panel panel-primary" style="margin: 10px 10px;">
  <div class="panel-heading">
    角色列表
  </div>

  <div class="clearfix" style="margin-bottom: 10px;"></div>
  <div class="row">
    <form>
        <div class="col-md-offset-1 col-md-2 margin-bottom-15">
          <label for="role_name" class="control-label">角色名</label>
          <input type="text" class="form-control" id="role_name" value="" name="role_name">                  
        </div>             
        <div class="row templatemo-form-buttons">
                <div class="col-md-2">
                  <button type="submit" class="btn btn-primary" style="margin-top: 24px;margin-left: 20px;">查询</button>
                  <button type="reset" class="btn btn-default" style="margin-top: 24px;margin-left: 20px;">重置</button>    
                </div>
        </div>
       
        </form>
 

  </div>
  <div class="clearfix" style="margin-bottom: 10px;"></div>
  <div class="row">
    <div class="col-md-10 col-md-offset-1">
      <div class="table-responsive">
        <table class="table table-striped table-hover table-bordered">
          <thead>
            <tr>
              <th>角色id</th>
              <th>角色名</th>
              <th>角色描述</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>

             <%for(var i=0;i<body.length;i++) {%>
             <tr>

               <td><%=body[i].id%></td>

               <td><%=body[i].role_name%></td>

               <td><%=body[i].description%></td>

               <td>
                 <a href="/roles/edit?id=<%=body[i].id%>" class="btn btn-info">修改</a>
                 <a href="/roles/delect/<%=body[i].id %>" class="btn btn-danger delete">删除</a>
               </td>

             </tr>
              
             <%}%>

            </tbody>
        </table>




        </div>
        </div>
    </div>

    </div>

     
    

</body>

</html>